INCLUDE=../include/
MODEL=../src/model/
VIEW=../src/view/
CONTROLLER=../src/controller/
FLAGS=`pkg-config --cflags --libs gtk+-2.0 goocanvas`
STATIC=-Wall -ansi -Werror
COMPILER=g++ -I$(INCLUDE) $(FLAGS) $(STATIC)

OBJECTS=Unit_Test.o systemSettingMessage.o attackTargetMessage.o attackerMessage.o broadcast.o modelManager.o sendToModel.o postManager.o \
	iconButton.o dockIcon.o

Unit_test:$(OBJECTS)
	$(COMPILER) -o Unit_test $(OBJECTS)
Unit_Test.o:Unit_Test.cpp Unit_Test.h
	$(COMPILER) -c Unit_Test.cpp
systemSettingMessage.o:$(MODEL)systemSettingMessage.cpp $(INCLUDE)systemSettingMessage.h
	$(COMPILER) -c $(MODEL)systemSettingMessage.cpp -o systemSettingMessage.o
attackTargetMessage.o:$(MODEL)attackTargetMessage.cpp $(INCLUDE)attackTargetMessage.h
	$(COMPILER) -c $(MODEL)attackTargetMessage.cpp -o attackTargetMessage.o
attackerMessage.o:$(MODEL)attackerMessage.cpp $(INCLUDE)attackerMessage.h
	$(COMPILER) -c $(MODEL)attackerMessage.cpp -o attackerMessage.o
modelManager.o:$(MODEL)modelManager.cpp $(INCLUDE)modelManager.h
	$(COMPILER) -c $(MODEL)modelManager.cpp -o modelManager.o
broadcast.o:$(CONTROLLER)broadcast.cpp $(INCLUDE)broadcast.h
	$(COMPILER) -c $(CONTROLLER)broadcast.cpp -o broadcast.o
sendToModel.o:$(CONTROLLER)sendToModel.cpp $(INCLUDE)sendToModel.h
	$(COMPILER) -c $(CONTROLLER)sendToModel.cpp -o sendToModel.o
postManager.o:$(CONTROLLER)postManager.cpp $(INCLUDE)postManager.h
	$(COMPILER) -c $(CONTROLLER)postManager.cpp -o postManager.o
iconButton.o:$(VIEW)iconButton.cpp $(INCLUDE)iconButton.h
	$(COMPILER) -c $(VIEW)iconButton.cpp -o iconButton.o
dockIcon.o:$(VIEW)dockIcon.cpp $(INCLUDE)dockIcon.h
	$(COMPILER) -c $(VIEW)dockIcon.cpp -o dockIcon.o

clean:
	- rm -rf *~ *.o Unit_test
